package com.yu.xcx.mapper;

import com.yu.xcx.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface UserMapper extends BaseMapper<User> {

    @Insert("insert into tb_user(open_id,se_key) values (\"${openId}\",\"${sekey}\")")
    public Integer savaUser(String openId, String sekey);

    @Select("select * from tb_user where open_id = \"${openId}\"")
    public User getByOpenId(String openId);
}
